package com.yueya.im.node.messages;

import com.yueya.im.common.model.SysResp;

public class DefaultResp {
    public static SysResp OK(int msgType){
        SysResp sysResp = new SysResp();
        sysResp.setStatus(200);
        sysResp.setMsgType(msgType);
        return sysResp;
    }

    public static SysResp OkWithData(int msgType,Object content){
        SysResp sysResp = new SysResp();
        sysResp.setStatus(200);
        sysResp.setMsgType(msgType);
        sysResp.setContent(content);
        return sysResp;
    }

    public static SysResp ERROR(int msgType) {
        SysResp sysResp = new SysResp();
        sysResp.setStatus(200);
        sysResp.setMsgType(msgType);
        return sysResp;
    }

    public static SysResp ErrWithData(int msgType,Object content){
        SysResp sysResp = new SysResp();
        sysResp.setStatus(500);
        sysResp.setMsgType(msgType);
        sysResp.setContent(content);
        return sysResp;
    }

}
